require_relative "helper"
require "yeast"

describe Yeast do

  it "must calculate yeast cells required" do
    Yeast.cells_required({
      extract: 12,
      volume: 20
    }).must_equal 180_000_000_000

    Yeast.cells_required({
      extract: 12,
      volume: 20,
      type: :hybrid
    }).must_equal 270_000_000_000

    Yeast.cells_required({
      extract: 12,
      volume: 20,
      type: :lager
    }).must_equal 360_000_000_000
  end

  it "must calculate apparent attenuation" do
    (Yeast.attenuation 13.5, 3.1).must_equal 77
  end

end

#   it "must calculate apparent attenuation" do
#     (Calculate.apparent_attenuation 13.5, 3.1).must_equal 77
#   end
#
#   it "must calculate apparent attenuation from specific gravity" do
#     (Calculate.apparent_attenuation 1.055, 1.012, :specific_gravity).must_equal 77
#   end
#
#   it "must calculate apparent attenuation from brix" do
#     (Calculate.apparent_attenuation 13.3, 7.1, :brix).must_equal 77
#   end
#
#   it "must raise an exception when the extract unit is unrecognized" do
#     lambda { Calculate.apparent_attenuation 10, 5, :dunno }.must_raise ArgumentError
#   end
#
# end
